package sy.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * AbstractTCustomerInfo entity provides the base persistence definition of the
 * TCustomerInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_CUSTOMER_INFO", schema = "")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TcustomerInfo implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String customerid;
	private String customercode;
	private String customerzhhame;
	private String customerenname;
	private String linkman;
	private String zhaddr;
	private String enaddr;
	private String contact;
	private String fax;
	private String createtime;
	private Set<TOrderCash> orderCashs = new HashSet<TOrderCash>(0);
	// Constructors

	/** default constructor */
	public TcustomerInfo() {
	}

	/** minimal constructor */
	public TcustomerInfo(String customerCode, String customerZHName) {
		this.customercode = customerCode;
		this.customerzhhame = customerZHName;
	}

	/** full constructor */
	public TcustomerInfo(String customerCode, String customerZHName,
			String customerENName, String linkMan, String ZHAddr,
			String ENAddr, String contact, String fax, String createTime) {
		this.customercode = customerCode;
		this.customerzhhame = customerZHName;
		this.customerenname = customerENName;
		this.linkman = linkMan;
		this.zhaddr = ZHAddr;
		this.enaddr = ENAddr;
		this.contact = contact;
		this.fax = fax;
		this.createtime = createTime;
	}

	// Property accessors

	@Id
	@Column(name = "CUSTOMERID", nullable = false, length = 36)
	public String getCustomerid() {
		return this.customerid;
	}

	public void setCustomerid(String customerId) {
		this.customerid = customerId;
	}

	@Column(name = "CUSTOMERCODE", nullable = false, length = 10)
	public String getCustomercode() {
		return this.customercode;
	}

	public void setCustomercode(String customerCode) {
		this.customercode = customerCode;
	}

	@Column(name = "CUSTOMERZHNAME", nullable = false, length = 20)
	public String getCustomerzhname() {
		return this.customerzhhame;
	}

	public void setCustomerzhname(String customerZHName) {
		this.customerzhhame = customerZHName;
	}

	@Column(name = "CUSTOMERENNAME", nullable = true, length = 20)
	public String getCustomerenname() {
		return this.customerenname;
	}

	public void setCustomerenname(String customerENName) {
		this.customerenname = customerENName;
	}

	@Column(name = "LINKMAN", nullable = true, length = 15)
	public String getLinkman() {
		return this.linkman;
	}

	public void setLinkman(String linkMan) {
		this.linkman = linkMan;
	}

	@Column(name = "ZHADDR", nullable = true, length = 50)
	public String getZhaddr() {
		return this.zhaddr;
	}

	public void setZhaddr(String ZHAddr) {
		this.zhaddr = ZHAddr;
	}

	@Column(name = "ENADDR", nullable = true, length = 50)
	public String getEnaddr() {
		return this.enaddr;
	}

	public void setEnaddr(String ENAddr) {
		this.enaddr = ENAddr;
	}

	@Column(name = "CONTACT", nullable = true, length = 15)
	public String getContact() {
		return this.contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	@Column(name = "FAX", nullable = true, length = 15 )
	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Column(name = "CREATETIME", nullable = true, length = 30)
	public String getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(String createTime) {
		this.createtime = createTime;
	}
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tcustomerInfo")
	public Set<TOrderCash> getOrderCashs() {
		return orderCashs;
	}

	public void setOrderCashs(Set<TOrderCash> orderCashs) {
		this.orderCashs = orderCashs;
	}
	

}